package com.mioto.ld.module.alert.service.impl;

import org.springframework.stereotype.Service;

import com.mioto.ld.module.alert.dao.AlertTriggerDao;
import com.mioto.ld.module.alert.model.AlertTrigger;
import com.mioto.ld.module.alert.service.IAlertTriggerService;
import javax.annotation.Resource;
import java.util.List;

/**
 *
 * @author mioto
 * @date 2024-05-20 23:49:41
 */
@Service("alertTriggerService")
public class AlertTriggerServiceImpl implements IAlertTriggerService{

    @Resource
    private AlertTriggerDao alertTriggerDao;

    @Override
    public List<AlertTrigger> findList(AlertTrigger alertTrigger) {
        return alertTriggerDao.findList(alertTrigger);
    }

    @Override
    public int insert(AlertTrigger alertTrigger) {
        return alertTriggerDao.insertIgnoreNull(alertTrigger);
    }

    @Override
    public int update(AlertTrigger alertTrigger) {
        return alertTriggerDao.update(alertTrigger);
    }

    @Override
    public int updateIgnoreNull(AlertTrigger alertTrigger) {
        return alertTriggerDao.updateIgnoreNull(alertTrigger);
    }

    @Override
    public AlertTrigger findByColumn(String column, Object value) {
        return alertTriggerDao.findByColumn(column,value);
    }

    @Override
    public int deleteByColumn(String column, Object value) {
        return alertTriggerDao.deleteByColumn(column,value);
    }

    @Override
    public int batchDelete(Integer[] ids) {
        return alertTriggerDao.batchDelete(ids);
    }

    @Override
    public List<AlertTrigger> findEventTriggersByDeviceId(Integer deviceId) {
        return alertTriggerDao.findEventTriggersByDeviceId(deviceId);
    }

    @Override
    public List<AlertTrigger> findAttrTriggersByDeviceId(Integer deviceId) {
        return alertTriggerDao.findAttrTriggersByDeviceId(deviceId);
    }
}